doctype 5
html
  head
    title="HomeCloud"
    link(rel='stylesheet', href='/stylesheets/layout.css')
    
    //link(rel='stylesheet', href='/javascripts/vendor/statusbar/jquery.ui.statusbar.css')
    link(rel='stylesheet', href='/javascripts/vendor/potatomenu/jquery.ui.potato.menu.css')
    link(rel='stylesheet', href='/javascripts/vendor/pnotify/jquery.pnotify.default.css')
    link(rel='stylesheet', href='/javascripts/vendor/SlickGrid/slick.grid.css')
    link(rel='stylesheet', href='/javascripts/vendor/SlickGrid/css/smoothness/jquery-ui-1.8.16.custom.css')
    //link(rel='stylesheet', href='/javascripts/vendor/jbar/jbar.css')
    script(type='text/javascript', src='http://www.google.com/jsapi')
    script(type='text/javascript)
     google.load("jquery", "1.7");
     google.load("jqueryui", "1.8");
    script(type='text/javascript', src='/javascripts/layout.js')
    script(type='text/javascript', src='/javascripts/vendor/JsonUtil.js')
    script(type='text/javascript', src='/javascripts/vendor/moment/moment.min.js')
    
    link(rel='stylesheet', href='/javascripts/vendor/jsonform/deps/opt/bootstrap.css')
    script(type='text/javascript', src='/javascripts/vendor/jsonform/deps//underscore.js')
    script(type='text/javascript', src='/javascripts/vendor/jsonform/deps/opt/ace/ace.js')
    script(type='text/javascript', src='/javascripts/vendor/jsonform/deps/opt/jsv.js')
    script(type='text/javascript', src='/javascripts/vendor/jsonform/jsonform.js')
    
    script(type='text/javascript', src='/javascripts/vendor/SlickGrid/lib/jquery.event.drag-2.2.js')
    script(type='text/javascript', src='/javascripts/vendor/SlickGrid/lib/jquery.event.drop-2.2.js')
    script(type='text/javascript', src='/javascripts/vendor/SlickGrid/slick.core.js')
    script(type='text/javascript', src='/javascripts/vendor/SlickGrid/slick.editors.js')
    script(type='text/javascript', src='/javascripts/vendor/SlickGrid/slick.formatters.js')
    
    //script(type='text/javascript', src='/javascripts/vendor/SlickGrid/slick.remotemodel.js')
    script(type='text/javascript', src='/javascripts/vendor/SlickGrid/slick.grid.js')
   
    
    //script(type='text/javascript', src='/javascripts/vendor/statusbar/jquery.ui.statusbar.min.js')
    script(type='text/javascript', src='/javascripts/vendor/potatomenu/jquery.ui.potato.menu.js')
    //script(type='text/javascript', src='/javascripts/vendor/jbar/jquery.jbar.js')
    script(type='text/javascript', src='/javascripts/vendor/jquery.jstree.js')
    script(type='text/javascript', src='/javascripts/vendor/pnotify/jquery.pnotify.js')
    
    script(type='text/javascript', src='/javascripts/api.js')
    
    script(type='text/javascript')
      var user = !{JSON.stringify(user|null)};
    block header
  body
   
    div(id="wrapper")
   
        div(id="headerwrap")
        div(id="header")
          p
           ul#topmenu 
            -if(!user)
             li
              a(href="javascript:void(0)")="Login"
              ul
               li
                form(action="/login", method="post")
                   //fieldset
                   //  div(class="FieldLabel")="Username"
                   //  div(class="FieldItem")
                   input(type="text", name="name", class="Text", style="width:100px")
                   //  div(class="FieldLabel")="Password"
                     
                   input(type="password", name="password", class="Text", style="width:100px")
                   input(class="button", type="submit", value="Login")  
            -else
             li
              a(href="javascript:void(0)")=user.name
            li
              a(href="/maps")="map"
              ul
                li
                 a(href="/maps/edit")="Edit"
            li
              a(href="/charts/")="Charts"
              ul
                li
                 a(href="/charts/temperatures")="Temperature"
                li
                 a(href="/charts/energy")="Energy"
            li
              a(href="/devices")="Devices"
              ul
                li
                 a(href="/devices/tree")="Tree"
                //li
                // a(href="/devices/status")="Status"
                li
                 a(href="/devices?type=switch")="Switches"
                li
                 a(href="/devices?type=sensor")="Sensors"
                li
                 a(href="/devices?type=meter")="Meters"
                li
                 a(href="/devices?type=thermostats")="Thermostats"
                li
                 a(href="/devices?type=locks")="Locks"
                li
                 a(href="/devices?type=cameras")="Cameras"
                li
                 a(href="/devices/configurations")="Configurations"
            //li
            //  a(href="/networks")="Network"
            //  ul
            //    li
            //     a(href="/networks?page=managment")="managment"
            //    li
            //     a(href="/networks?page=routes")="Routing table"
            li
              a(href="/automations")="Automation"
              ul
                li
                 a(href="/actions")="Actions"
                //li
                // a(href="/automations?page=climateSchedules")="Climate schedules"
                //li
                // a(href="/rules")="Rules"
                li
                 a(href="/schedules")="Schedules"
                //li
                // a(href="/zones/states")="Zone states"
            li
              a(href="/experts")="Admin"
              ul
                //li
                // a(href="javascript:void(0)")="Controller info"
                li
                 a(href="/events")="Events"
                li
                 a(href="/devices/events")="Device events"
                //li
                // a(href="javascript:void(0)")="Commands"
                li
                 a(href="/admin/configure")="configurations"
            li
              a(href="#", id="about")="About"
        
        div(id="contentwrap")
        div(id="content")
          p 
           block content
           div#genericDialog
       
        
        div(id="footerwrap")
        div(id="footer")
           p(style="margin: 0px 20%;")
             a(href="http://code.google.com/p/node-home-automation/")
              ="node-home-automation"
             =" - Designed by JVA"